package com.CoviMobileApp;

import android.app.Dialog;
import android.content.Context;
import android.view.ViewGroup.LayoutParams;
import android.widget.ProgressBar;

public class PgDialog extends Dialog
{
	public static PgDialog show(Context context, CharSequence title, CharSequence message)
	{
		return show(context,title,message);
	}

	public static PgDialog show(Context context, CharSequence title, CharSequence message, boolean indeterminate)
	{
		return show(context,title,message,indeterminate);
	}
	
	public static PgDialog show(Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable)
	{
		return show(context, title, message, indeterminate, cancelable);
	}
	
	public static PgDialog show(Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable, OnCancelListener cancelListener)
	{
		PgDialog dialog = new PgDialog(context);
		dialog.setTitle(title);
		dialog.setCancelable(cancelable);
		dialog.setOnCancelListener(cancelListener);
		dialog.addContentView(new ProgressBar(context), new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
		dialog.show();
		
		return dialog;
	}	

	public PgDialog(Context context)
	{
		// TODO Auto-generated constructor stub
		super(context,R.style.NewDialog);
	}

}
